package services

import (
	"gosup/dao"
	"gosup/models"
)

func GetAllPurchaseMain(purchaseMainParam map[string]interface{}) (error, []models.PurchaseMain, int64) {
	err, purchaseMainData, total := dao.GetAllPurchaseMain(purchaseMainParam)
	return err, purchaseMainData, total
}

func DelPurchaseMain(id int) error {
	err := dao.DelPurchaseMain(id)
	return err
}

func UpdatePurchaseMain(purchaseList models.PurchaseMain) error {
	err := dao.UpdatePurchaseMain(purchaseList)
	return err
}

func AddPurchaseMain(purchaseList models.PurchaseMain) (error) {
	err := dao.AddPurchaseMain(purchaseList)
	return err
}


